<script lang="ts" setup>
import type { EChartsOption } from 'echarts'
import { useChartBase } from '../hooks'
import defaultOptions from './options'
import { Charts } from '@/components'
import type { CustomComponent } from '@/custom-components/type'

const props = withDefaults(defineProps<{ config?: CustomComponent }>(), {})

const { options } = useChartBase({ defaultOptions, config: props?.config })
</script>

<template>
  <Charts :options="options" />
</template>
